﻿<common:LayoutAwarePage
    x:Name="pageRoot"
    x:Class="HealthManagementTemplate.SetProfilePage"
    DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Self}}"
    IsTabStop="false"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:HealthManagementTemplate"
    xmlns:common="using:HealthManagementTemplate.Common"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" FontFamily="Global User Interface">

    <Page.Resources>

        <!-- TODO: Delete this line if the key AppName is declared in App.xaml -->
        <x:String x:Key="AppName">My Application</x:String>
    </Page.Resources>

    <!--
        This grid acts as a root panel for the page that defines two rows:
        * Row 0 contains the back button and page title
        * Row 1 contains the rest of the page layout
    -->
        <Grid Background="#778899">
            <Grid.RowDefinitions>
                <RowDefinition Height="140"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>

            <!-- Back button and page title -->
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Button x:Name="backButton" Click="GoBack" IsEnabled="{Binding Frame.CanGoBack, ElementName=pageRoot}" Style="{StaticResource BackButtonStyle}"/>
                <TextBlock x:Name="pageTitle" Grid.Column="1" Text="Your App Slogan / Logo Goes Here" Style="{StaticResource PageHeaderTextStyle}" Foreground="White"/>
            </Grid>

        <ScrollViewer x:Name="MainScroll"  Grid.Row="1" Style="{StaticResource HorizontalScrollViewerStyle}">
                <StackPanel HorizontalAlignment="Left" Height="491" Margin="120,20,0,0" Width="1004" Orientation="Horizontal" VerticalAlignment="Top">
                    <StackPanel HorizontalAlignment="Left" Height="490" Margin="0" VerticalAlignment="Top" Width="345">
                        <TextBlock HorizontalAlignment="Left" Height="42" Margin="1,0,0,0" TextWrapping="Wrap" Text="Name/Nickname" VerticalAlignment="Top" Width="341" FontFamily="Segoe UI" FontSize="25.333" Foreground="White" Padding="0,4,0,0"/>
                        <TextBox HorizontalAlignment="Left" Height="42" TextWrapping="Wrap" VerticalAlignment="Top" Width="343" Background=" #FFEFD5 " Foreground="#FFA7A6A6" FontSize="21.333" BorderThickness="0"/>
                        <TextBlock HorizontalAlignment="Left" Height="42" Margin="1,0,0,0" TextWrapping="Wrap" Text="Date of Birth" VerticalAlignment="Top" Width="341" FontFamily="Segoe UI" FontSize="25.333" Foreground="White"/>
                        <TextBox HorizontalAlignment="Left" Height="42" TextWrapping="Wrap" VerticalAlignment="Top" Width="343" Background=" #FFEFD5 " Foreground="#FFA7A6A6" Text="DD/MM/YYYY" FontSize="21.333" BorderThickness="0"/>
                        <TextBlock HorizontalAlignment="Left" Height="42" Margin="1,0,0,0" TextWrapping="Wrap" Text="Gender" VerticalAlignment="Top" Width="341" FontFamily="Segoe UI" FontSize="25.333" Foreground="White"/>
                        <TextBox HorizontalAlignment="Left" Height="42" TextWrapping="Wrap" VerticalAlignment="Top" Width="343" Background=" #FFEFD5 " Foreground="#FFA7A6A6" FontSize="21.333" BorderThickness="0"/>
                        <TextBlock HorizontalAlignment="Left" Height="42" Margin="1,0,0,0" TextWrapping="Wrap" Text="BloodGroup" VerticalAlignment="Top" Width="341" FontFamily="Segoe UI" FontSize="25.333" Foreground="White"/>
                        <TextBox HorizontalAlignment="Left" Height="42" TextWrapping="Wrap" VerticalAlignment="Top" Width="343" Background=" #FFEFD5 " Foreground="#FFA7A6A6" FontSize="21.333" BorderThickness="0"/>
                        <TextBlock HorizontalAlignment="Left" Height="42" Margin="1,0,0,0" TextWrapping="Wrap" Text="Alergies" VerticalAlignment="Top" Width="341" FontFamily="Segoe UI" FontSize="25.333" Foreground="White"/>
                        <TextBox HorizontalAlignment="Left" Height="122" TextWrapping="Wrap" VerticalAlignment="Top" Width="343" Background=" #FFEFD5 " Foreground="#FFA7A6A6" FontSize="21.333" BorderThickness="0"/>
                    </StackPanel>
                    <StackPanel HorizontalAlignment="Left" Height="490" Margin="18,0,0,0" VerticalAlignment="Top" Width="310">
                        <TextBlock HorizontalAlignment="Left" Height="42" Margin="0" TextWrapping="Wrap" Text="Weight" Width="304" Foreground="White" FontSize="25.333" VerticalAlignment="Top" Padding="0,4,0,0" FontFamily="Segoe UI"/>
                        <TextBox HorizontalAlignment="Left" Height="42" Margin="0" TextWrapping="Wrap" Text="In Kgs" Width="304" VerticalAlignment="Top" Background=" #FFEFD5 " Foreground="#FF868585" FontSize="21.333" BorderThickness="0" Padding="10,3,0,0"/>
                        <TextBlock HorizontalAlignment="Left" Height="42" Margin="0" TextWrapping="Wrap" Text="Health Issues" Width="304" Foreground="White" FontSize="25.333" VerticalAlignment="Top" Padding="0,8,0,0"/>
                        <GridViewItem x:Name="diabeties" Margin="-4,0,0,0" Height="45" HorizontalAlignment="Left" VerticalAlignment="Top">
                            <Grid HorizontalAlignment="Left" Height="42" Width="304" VerticalAlignment="Top" Background="#FFFACD">
                                <TextBlock Height="46" TextWrapping="Wrap" Text="Diabeties" Width="304" Foreground="#FF868585" FontFamily="Segoe UI" FontSize="21.333" VerticalAlignment="Top" HorizontalAlignment="Left" Padding="0,6,0,0" Margin="10,0,0,0"/>
                                <Image Margin="0,0,10,0" Source="images/right2.png" Stretch="Fill" Width="21" Height="17" HorizontalAlignment="Right" VerticalAlignment="Center"/>
                            </Grid>
                        </GridViewItem>
                        <GridViewItem x:Name="BP" Margin="-4,0,0,0" Height="45" HorizontalAlignment="Left" VerticalAlignment="Top">
                            <Grid HorizontalAlignment="Left" Height="42" Width="304" VerticalAlignment="Top" Background="#FFFACD" Margin="0">
                                <TextBlock Height="46" TextWrapping="Wrap" Text="Hypertension" Width="304" Foreground="#FF868585" FontFamily="Segoe UI" FontSize="21.333" VerticalAlignment="Top" HorizontalAlignment="Left" Padding="0,6,0,0" Margin="10,0,0,0"/>
                                <Image Margin="0,0,10,0" Source="images/right2.png" Stretch="Fill" Width="21" Height="17" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                            </Grid>
                        </GridViewItem>
                        <GridViewItem x:Name="Thyroid" Margin="-4,0,0,0" Height="45" HorizontalAlignment="Left" VerticalAlignment="Top">
                            <Grid HorizontalAlignment="Left" Height="42" Width="304" VerticalAlignment="Top" Background="#FFFACD" Margin="0">
                                <TextBlock Height="46" TextWrapping="Wrap" Text="Hyper/Hypo Thyroid" Width="304" Foreground="#FF868585" FontFamily="Segoe UI" FontSize="21.333" VerticalAlignment="Top" HorizontalAlignment="Left" Padding="0,6,0,0" Margin="10,0,0,0"/>
                                <Image Margin="0,13.5,10,13.5" Source="images/right2.png" Stretch="Fill" Width="21" Height="17" HorizontalAlignment="Right" VerticalAlignment="Center"/>
                            </Grid>
                        </GridViewItem>
                        <GridViewItem x:Name="anemia" Margin="-4,0,0,0" Height="45">
                            <Grid HorizontalAlignment="Left" Height="42" Width="304" VerticalAlignment="Top" Background="#FFFACD" Margin="0">
                                <TextBlock Height="46" TextWrapping="Wrap" Text="Anemia" Width="304" Foreground="#FF868585" FontFamily="Segoe UI" FontSize="21.333" VerticalAlignment="Top" HorizontalAlignment="Left" Padding="0,6,0,0" Margin="10,0,0,0"/>
                                <Image Margin="0,13.5,10,13.5" Source="images/right2.png" Stretch="Fill" Width="21" Height="17" HorizontalAlignment="Right" VerticalAlignment="Center"/>
                            </Grid>
                        </GridViewItem>
                        <GridViewItem x:Name="Asthama" Margin="-4,0,0,0" Height="45" HorizontalAlignment="Left" VerticalAlignment="Top">
                            <Grid HorizontalAlignment="Left" Height="42" Width="304" VerticalAlignment="Top" Background="#FFFACD" Margin="0">
                                <TextBlock Height="46" TextWrapping="Wrap" Text="Asthama" Width="304" Foreground="#FF868585" FontFamily="Segoe UI" FontSize="21.333" VerticalAlignment="Top" HorizontalAlignment="Left" Padding="0,6,0,0" Margin="10,0,0,0"/>
                                <Image Margin="0,13.5,10,13.5" Source="images/right2.png" Stretch="Fill" Width="21" Height="17" HorizontalAlignment="Right" VerticalAlignment="Center"/>
                            </Grid>
                        </GridViewItem>
                        <TextBox HorizontalAlignment="Left" Height="100" TextWrapping="Wrap" Text="TextBox" Width="304" Padding="10,3,0,0" Background=" #FFEFD5 " Foreground="#FF868585" BorderThickness="0" FontSize="21.333" Margin="0,3,0,0"/>
                        <GridViewItem x:Name="Add" Margin="-4,-4,0,0" Height="45" HorizontalAlignment="Left" VerticalAlignment="Top">
                            <Grid HorizontalAlignment="Left" Height="42" Width="304" VerticalAlignment="Top" Background="#FFED0043" Margin="0">
                                <TextBlock Height="46" TextWrapping="Wrap" Text="Add a disease" Width="294" Foreground="White" FontFamily="Segoe UI" FontSize="21.333" VerticalAlignment="Top" HorizontalAlignment="Left" Padding="0,2,0,0" Margin="10,0,0,-4"/>
                                <Image Margin="0,0,10,2" Source="images/plus.png" Stretch="Fill" Width="19" Height="19" HorizontalAlignment="Right" VerticalAlignment="Center"/>
                            </Grid>
                        </GridViewItem>
                    </StackPanel>
                    <StackPanel Height="490" Margin="33,0,0,0" VerticalAlignment="Top" Width="300" HorizontalAlignment="Left">
                        <Image Height="219" Margin="00,40,0,0" Source="images/profilepic.png" Stretch="Fill" Width="299" HorizontalAlignment="Left" VerticalAlignment="Top"/>
                        <GridViewItem x:Name="Add_profile" Margin="-4,-4,0,0" Height="81" VerticalAlignment="Top" Width="306" HorizontalAlignment="Left">
                            <Grid Height="81" Width="306" Background="#FFED0043" HorizontalAlignment="Left" VerticalAlignment="Top">
                                <TextBlock Height="81" TextWrapping="Wrap" Width="294" Foreground="White" FontFamily="Segoe UI" FontSize="21.333" VerticalAlignment="Top" HorizontalAlignment="Left" Padding="0" Margin="2,0,0,0">
        						<Run FontSize="14.667" Text="Add Profile Picture"/>
        						<LineBreak/>
        						<Run Text="Browse"/>
                                </TextBlock>
                            </Grid>
                        </GridViewItem>
                        <GridViewItem x:Name="Save" Margin="0,110,0,0" Width="306" Height="48" VerticalAlignment="Top" HorizontalAlignment="Left" Tapped="Save_Tapped">
                            <Grid HorizontalAlignment="Left" Height="42" Width="306" VerticalAlignment="Top" Background="#FFED0043" Margin="-4,0,0,0">
                                <TextBlock Height="46" TextWrapping="Wrap" Text=" Save" Width="296" Foreground="White" FontFamily="Segoe UI" FontSize="21.333" VerticalAlignment="Top" HorizontalAlignment="Left" Padding="0,2,0,0" Margin="0,0,0,-4"/>
                            </Grid>
                        </GridViewItem>
                    </StackPanel>
                </StackPanel>
            </ScrollViewer>

            <Grid x:Name="gridSnap" Visibility="Collapsed" Grid.Row="1">
                <StackPanel Margin="15,0,20,20" Orientation="Vertical" d:LayoutOverrides="Height">

                    <TextBlock Foreground="#ffffff" TextWrapping="Wrap" FontSize="22" Margin="0,200,0,0" HorizontalAlignment="Center" VerticalAlignment="Center" FontWeight="SemiBold" >
                    <Run Text="Please switch to full screen to view the details."/>
                    <LineBreak/>
                    <Run/>
                    <LineBreak/>
                    <Run Text="" />
                    <LineBreak/>
                    <Run/>
                    <LineBreak/>
                    <LineBreak/>
                    <Run/>
                    <LineBreak/>
                    </TextBlock>
                </StackPanel>
                <Image Margin="0,495,0,0" Source="Assets/Images/bg.jpg" Stretch="Fill"/>
            </Grid>

            <VisualStateManager.VisualStateGroups>

                <!-- Visual states reflect the application's view state -->
                <VisualStateGroup>
                    <VisualState x:Name="FullScreenLandscape"/>
                    <VisualState x:Name="Filled"/>

                    <!-- The entire page respects the narrower 100-pixel margin convention for portrait -->
                    <VisualState x:Name="FullScreenPortrait">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="backButton" Storyboard.TargetProperty="Style">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PortraitBackButtonStyle}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>

                    <!-- The back button and title have different styles when snapped -->
                    <VisualState x:Name="Snapped">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="backButton" Storyboard.TargetProperty="Style">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SnappedBackButtonStyle}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="pageTitle" Storyboard.TargetProperty="Style">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SnappedPageHeaderTextStyle}"/>
                            </ObjectAnimationUsingKeyFrames>

                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="gridSnap" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                            </ObjectAnimationUsingKeyFrames>

                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MainScroll" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                            </ObjectAnimationUsingKeyFrames>
                          
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
        </Grid>
    
</common:LayoutAwarePage>
